import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:go_router/go_router.dart';

class HomeScreen extends StatelessWidget {
  /// Constructs a [HomeScreen]
  HomeScreen({super.key});



  @override
  Widget build(BuildContext context) {

    return Scaffold(
      appBar: AppBar(title: const Text('首页'),centerTitle: true,),
      body: Column(
        crossAxisAlignment: CrossAxisAlignment.center,
        children: [
          ElevatedButton(
            onPressed: () => context.push('/custom'),
            child: const Text('Custom'),
          ),
          ElevatedButton(
            onPressed: () => context.push('/datePicker'),
            child: const Text('datePicker'),
          ),
          ElevatedButton(
            onPressed: () => context.push('/graphic'),
            child: const Text('Graphic'),
          ),
          ElevatedButton(
            onPressed: () => context.push('/performance'),
            child: const Text('performance'),
          ),
          ElevatedButton(
            onPressed: () => context.push('/module'),
            child: const Text('Module'),
          ),
        ],
      ),
    );
  }
}

/// The details screen
class DetailsScreen extends StatelessWidget {
  /// Constructs a [DetailsScreen]
  const DetailsScreen({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('Details Screen')),
      body: Column(
        children: [
          ElevatedButton(
            onPressed: () => context.push('/'),
            child: Column(
              children: [
                const Text('Go back to the Home screen'),
                TextField()
              ],
            ),
          ),
        ],
      ),
    );
  }
}